import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  mode:"history",
  routes: [
    {
      path: '/',//登录
      name: 'login',
      component: ()=> import("@/components/view/Login")
    },
    {
      path: '/index',
      name: 'index',
      component: ()=> import("@/components/view/Index"),
      children:[
        {
          path: 'paperCreate',
          name: 'paperCreate',
          component: ()=> import("@/components/view/PaperCreate")
        },
        {
          path: 'examCreate',
          name: 'examCreate',
          component: ()=> import("@/components/view/ExamCreate")
        },
        {
          path: 'myExam',//我的考试
          name: 'myExam',
          component: ()=> import("@/components/view/MyExam")
        },
        {
          path: 'scoreCount',//成绩统计
          name: 'scoreCount',
          component: ()=> import("@/components/view/ScoreCount")
        },

      ]
    },
    {
      path: '*',//404错误页面
      name: 'error',
      component: ()=> import("@/components/view/Page404")
    },
    {
      path: '/curExam',//正在考试页面
      name: 'curExam',
      component: ()=> import("@/components/view/CurExam")
    },

    {
      path: '/testLogin',
      name: 'testLogin',
      component: ()=> import("@/components/test/TestLogin")
    },
    {
      path: '/testChat',
      name: 'testChat',
      component: ()=> import("@/components/test/TestChat")
    }


  ]
})
